package com.sky.mapper;

import com.sky.entity.ShoppingCart;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface ShoppingCartMapper {
    /**
     * 按条件查询购物车
     * @param shoppingCart
     * @return
     */
    List<ShoppingCart> query(ShoppingCart shoppingCart);

    /**
     * 更新购物车
     * @param shoppingCart
     */
    void update(ShoppingCart shoppingCart);

    /**
     * 保存购物车商品信息
     * @param shoppingCart
     */
    void save(ShoppingCart shoppingCart);

    /**
     * 删除购物车商品
     * @param shoppingCart
     */
    void delete(ShoppingCart shoppingCart);


    /**
     * 批量插入数据到数据库
     * @param shoppingCartList
     */
    void insertBatch(List<ShoppingCart> shoppingCartList);
}
